<form name="form_admin"  method="POST" action="<?php echo formEditAction()?>" onsubmit="return checkfrom(this);">
<input type="hidden" name="id" value="<?php echo $id?>" />
<table width="100%" cellpadding="0" cellspacing="0" id="tbledit">
	<tr>
        <td width="15%"><b><?php echo getLang('User Name')?></b></td>
        <td>
            <input type="text" class="normal2" name="cName" value="<?php echo $account['cName'];?>"
            <?php if($act=="myaccount" && $id!=1)echo 'readonly=readonly'?> />
            <input type="hidden" name="oldcName" value="<?php echo $account["cName"] ?>" />
        </td>
	</tr>

    <tr>
        <td><b><?php echo getLang('Email')?></b></td>
        <td>
        <input type="text" name="cEmail" id="cEmail" value="<?php echo $account["cEmail"] ?>" class="normal2"/>
        <input type="hidden" name="oldEmail" value="<?php echo $account["cEmail"] ?>" />
        </td>
    </tr>

    <tr>
        <td width="15%"><b><?php echo getLang('First Name')?></b></td>
        <td><input type="text" name="FirstName" id="FirstName" class="normal2" value="<?php echo $account["cFirstName"] ?>" /></td>
    </tr>

     <tr>
        <td width="15%"><b><?php echo getLang('Last Name')?></b></td>
        <td><input type="text" name="LastName" id="LastName" class="normal2" value="<?php echo $account["cLastName"] ?>" /></td>
    </tr>

    <tr>
      <td><strong><?php echo getLang('New Password')?></strong></td>
      <td><input type="password" name="password" class="normal2"/></td>
    </tr>
    <tr>
      <td><strong><?php echo getLang('Password Confirm')?> </strong></td>
      <td><input type="password" name="passwordconf" class="normal2"/></td>
    </tr>

    <tr>
        <td><b><?php echo getLang('Birthday')?></b></td>
        <td>
            <?php echo inputDate('dBirthday',$account["dBirthday"])?>
       </td>
    </tr>
    <tr>
        <td><b><?php echo getLang('Address')?></b></td>
        <td><input type="text" name="cAddress" id="cAddress" value="<?php echo $account["cAddress"] ?>" class="normal2"/></td>
    </tr>
	 <tr>
        <td><b>Suburb/City</b></td>
        <td><input type="text" name="cCity" id="cCity" value="<?php echo $account["cCity"] ?>" class="normal2"/></td>
    </tr>
	<tr>
        <td><b>State/Province/County</b></td>
        <td><input type="text" name="cState" id="cState" value="<?php echo $account["cState"] ?>" class="normal2"/></td>
    </tr>
	<tr>
        <td><b>Post Code/ZIP</b></td>
        <td><input type="text" name="cZipCode" id="cZipCode" value="<?php echo $account["cZipCode"] ?>" class="normal2"/></td>
    </tr>
	<tr>
        <td><b>Country</b></td>
        <td><input type="text" name="cCountry" id="cCountry" value="<?php echo $account["cCountry"] ?>" class="normal2"/></td>
    </tr>
	<tr>
        <td><b>Gender</b></td>
        <td><select name="Gender" id="Gender" >
				<?php echo ListGender($account["iGender"]) ?>
			</select>
		</td>
    </tr>
    <tr>
        <td><b>Mobi Phone</b></td>
        <td><input type="text" name="cMobiPhone" id="cMobiPhone" value="<?php echo $account["cMobiPhone"] ?>" class="normal2"/></td>
    </tr>
    <tr>
        <td><b>Home Phone</b></td>
        <td><input type="text" name="cHomePhone" id="cHomePhone" value="<?php echo $account["cHomePhone"] ?>" class="normal2"/></td>
    </tr>
	<tr>
        <td><b>Work Phone</b></td>
        <td><input type="text" name="cWorkPhone" id="cWorkPhone" value="<?php echo $account["cWorkPhone"] ?>" class="normal2"/></td>
    </tr>
<?
if($act!="myaccount")
{
?>
    <tr>
        <td><b>WorkGroup</b></td>
        <td>
            <select name="GroupId" id="GroupId">
        		<? echo List_Group_Change($account["iGroupId"])?>
        	</select>
        </td>
    </tr>
    <tr>
        <td><b><?php echo getLang('Status')?></b></td>
        <td>
        	<select name="iStatus" id="iStatus">
				<? echo ListStatusUser($account["iStatus"]);?>
        	</select>        </td>
    </tr>
<?
}
?>
    <tr>
        <td valign="top" style="vertical-align:top"><b><?php echo getLang('Other infomation')?></b></td>
        <td><textarea style="height:200px; width:90%;" name="cInfo"><?php echo $account["cInfo"] ?></textarea></td>
    </tr>

</table>
</form>
<script>
function checkfrom(f)
{
    if(f.cName.value=="")
    {
        alert("Please enter username");
        f.cName.focus();
        return false;
    }
    if(f.cEmail.value=="")
    {
        alert("Please enter Email");
        f.cEmail.focus();
        return false;
    }
    <?
    if($act=="add")
    {
    ?>
    if(f.password.value=="")
    {
        alert("Please enter password");
        f.password.focus();
        return false;
    }
    <?
    }
    ?>
	if(f.password.value!=f.passwordconf.value)
	{
		alert("please confirm password!");
		f.passwordconf.focus();
		return false;
	}
	return AIM.submit(f,null,true);
}
</script>